package kalender;

import java.util.ArrayList;

public class Dato {
	private int dag, maaned, aar;
	
	public Dato(int aar, int maaned, int dag){
		this.dag = dag;
		this.maaned = maaned;
		this.aar = aar;
	}
	
	public Dato(String datoString){
		String[] datoListe = datoString.split("-");
		this.aar = Integer.parseInt(datoListe[0]);
		this.maaned = Integer.parseInt(datoListe[1]);
		this.dag = Integer.parseInt(datoListe[2]);
	}
	
	public String toString(){
		return aar + "-" + maaned + "-" + dag;
	}
}
